import request from '@/utils/request'
// 获取区域
export function getArea(params) {
  return request({
    url: `/api/vm-service/region/search`,
    params
  })
}
// 获取点位管理table渲染数据
export function getTable(params) {
  return request({
    url: `/api/vm-service/node/search`,
    params
  })
}
// 商圈
export function getShangquan() {
  return request({
    url: `/api/vm-service/businessType`,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 归属合作商
export function getGuishu() {
  return request({
    url: `/api/user-service/partner/search`,
    params: {
      pageIndex: 1,
      pageSize: 10000
    }
  })
}
// 修改点位
export function getxiugaidianwei(data, id) {
  return request({
    url: `/api/vm-service/node/${id}`,
    method: 'put',
    data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 删除点位
export function getDeldianwei(id) {
  return request({
    url: `/api/vm-service/node/${id}`,
    method: 'delete',
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 获取详情
export function getDesc(id) {
  return request({
    url: `/api/vm-service/node/vmList/${id}`
  })
}
// 新增点位
export function addDianwei(data) {
  return request({
    url: `/api/vm-service/node`,
    method: 'post',
    data
  })
}
// 点位搜索
export function searchDianwei(params) {
  return request({
    url: `/api/vm-service/node/search`,
    params,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

